home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 6452 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.0 KB  |  40 lines

  1. Newsgroups: comp.lang.c
  2. Path: usenet.logical.net!news
  3. From: alexandr@logical.net (Rick & Diane Alexander)
  4. Subject: Re: printing text on screen
  5. Sender: news@logical.net
  6. Message-ID: <DnAy5G.83w@logical.net>
  7. Date: Sat, 24 Feb 1996 22:51:49 GMT
  8. X-Nntp-Posting-Host: dialup17.logical.net
  9. References: <312F86D2.2D3F@kelvin.physics.mun.ca>
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. Christopher Deacon <cdeacon@kelvin.physics.mun.ca> wrote:
  13.  
  14. >I want to know how to display a line of text at the bottom of
  15. >the screen, and how to turn it off again.
  16.  
  17. >I presume this has something to do with the curses library, but,as
  18. >usual, documentation is difficult to decipher!
  19.  
  20. >Chris
  21. The following may work (I assume you are on a unix system)
  22. #include <curses.h>
  23. #include <stdio.h>
  24. main()
  25. {
  26. WINDOW my_window;
  27. initscr();
  28. my_window = newwin(0,0, 0, 0);
  29. nonl();
  30. cbreak();
  31. noecho();
  32. idlok(stdscr, TRUE);
  33. keypad(stdscr, TRUE);
  34. move(20,1); /* this will place the cursor at row 20, column 0 */
  35. printw("Hello, World!");
  36. refresh(); /* to redraw the screen */
  37. }
  38.  
  39.  
  40.